The present invention relates to data compression, and more specifically, to the management of non-universal and universal encoders.
Data compression refers to the process of encoding information using fewer bits than the original representation. Each component or symbol of the original data is encoded to a compressed representation based on the code used by the encoder, and this compressed representation can be decoded back to the symbol based on the same code. A universal encoder is one that stores a code for every possible symbol. For example, when 8-bit data (i.e., data whose symbols can have values that range from 0 to 255) is encoded, a corresponding universal encoder includes 256 codes associated with the 256 possible values of the data. A non-universal encoder, on the other hand, includes codes associated with only a subset of all possible symbols. Thus, while a non-universal encoder has a potential disadvantage that it cannot compress a given symbol, it also has the advantage of increasing the compression rate by being able to use fewer bits than the universal encoder. To reap the advantages of the non-universal encoder while being able to compress all the desired data, management of non-universal and universal encoders is desirable in the art.